package com.demo.controller.dataManagemant;

import com.demo.common.ReturnCode;
import com.jfinal.core.Controller;
import com.jfinal.kit.Ret;
import com.jfinal.plugin.activerecord.Page;
import com.jfinal.plugin.activerecord.Record;

/**
 * @Classname EraNameController
 * @Description TODO
 * @Date 2020/3/19 21:15
 * @Created by yuanhang
 */
public class EraNameController extends Controller {

    /**
     * @return
     * @throws
     * @description 分页查询
     * @author yuanhang
     * @date 2020/3/10 19:02
     * @Param
     */
    public void paginate(int page, int limit) {
        Ret ret = new Ret();
        Page<Record> pageRecord = new Page<Record>();
        ret.set("code", ReturnCode.SUCCESS.getCode()).set("msg", ReturnCode.SUCCESS.getMsg()).set("data", pageRecord.getList()).set("count", pageRecord.getTotalRow());
        renderJson(ret);
    }


}
